home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / uw_1.exe / UW_HELP2.HLP < prev    next >
Text File  |  1992-11-03  |  24KB  |  766 lines

  1. `co(4,7);────────────────────────── /// Window I/O Routines ───────────────────────────`co();
  2.  ┌──────────────────────────────────────────────────────────────────────────┐    
  3.  │        `keyword(wn_plst,/// wn_plst);                `keyword(wn_printf,/// wn_printf);           `keyword(wn_st,/// wn_st);                  │
  4.  │        `keyword(wn_st_qty,/// wn_st_qty);              `keyword(wn_qch,/// wn_qch);              `keyword(wn_ch,/// wn_ch);                  │
  5.  │        `keyword(wn_och,/// wn_och);                 `keyword(wn_co,/// wn_co);               `keyword(wn_hline,/// wn_hline);               │
  6.  │        `keyword(wn_vline,/// wn_vline);               `keyword(wn_cleol,/// wn_cleol);            `keyword(wn_clbol,/// wn_clbol);               │     
  7.  │        `keyword(wn_claol,/// wn_claol);               `keyword(wn_cleos,/// wn_cleos);            `keyword(wn_clbos,/// wn_clbos);               │
  8.  │        `keyword(wn_claos,/// wn_claos);               `keyword(wn_cln,/// wn_cln);              `keyword(wn_ins_del_chars,/// wn_ins_del_chars);       │  
  9.  │        `keyword(wn_ins_del_lines,/// wn_ins_del_lines);       `keyword(wn_csr_dn,/// wn_csr_dn);           `keyword(wn_csr_up,/// wn_csr_up);              │
  10.  │        `keyword(wn_csr_left,/// wn_csr_left);            `keyword(wn_csr_right,/// wn_csr_right);        `keyword(wn_csr_pos,/// wn_csr_pos);             │
  11.  │        `keyword(wn_scroll_reg,/// wn_scroll_reg);          `keyword(wn_bksp,/// wn_bksp);                                    │
  12.  │        `keyword(wn_st_fmt,/// wn_st_fmt);                                                         │
  13.  └──────────────────────────────────────────────────────────────────────────┘
  14.  
  15.         These functions allow a great deal of flexibility for input/output to a
  16.     window. Included are string output routines, window "printf" capability,
  17.     multiple character output in both vertical and horizontal directions, line
  18.     drawing in a window with automatic blending of crossover points and border
  19.     intersection, clearing to the end of a line, beginning of line, end of
  20.     screen, and many others.  New for V2.5 is an output routine that will
  21.     process control characters such as bell, backspace, tabs, carriage returns
  22.     and line feeds.  It will even word wrap for you!  See `keyword(wn_st_fmt,/// wn_st_fmt);
  23.     for more details.
  24.  
  25. `co(10,1);/// wn_plst`co();   `keyword(source,[UW_ST.C]~wn_plst);
  26.         Outputs a string to a window starting at a specific row and column.
  27.  
  28. Prototype:
  29.     void wn_plst( int col, int line, char *s, WINDOW *wnp );
  30.  
  31. Parameters:
  32. `co(11,1);    int col, row`co();
  33.         The location of the window to begin output.  The column can also be set
  34.         to one of the three predefined values CENTERED, LEFT_JUST, and
  35.         RIGHT_JUST (defined in the file UW.H).
  36.  
  37. `co(11,1);    uchar *s`co();
  38.         A pointer to the characters to place in the window.
  39. `co(11,1);    WINDOW *wnp`co();
  40.         A pointer to the window in which the string is to be placed.
  41.  
  42. Usage:
  43.     wn_plst( 10, 20, "This string starts at x = 10, y = 20.", wnp );
  44.  
  45. `co(10,1);/// wn_printf`co();   `keyword(source,[UW_PRTF.C]~wn_printf);
  46.         Outputs formatted text to a window at the current window cursor
  47.     position. The formatted output takes the same format string as the printf
  48.     family of functions.
  49.  
  50. Prototype:
  51.     int wn_printf( WINDOW *wnp, char *fmt, ... );
  52.  
  53. Parameters:
  54. `co(11,1);    WINDOW *wnp`co();
  55.         The window in which to place the formatted output.
  56. `co(11,1);    char *fmt`co();
  57.         The format string, followed by any variables, strings, etc...
  58.  
  59. Usage:
  60.     WINDOW *wnp;
  61.     int x = 10;
  62.     float f = 3.14;
  63.     ...
  64.     wn_printf( wnp, "The value of x is %d, f is %4.2f", x, f );
  65.  
  66. `co(10,1);/// wn_st`co();   `keyword(source,[UW_ST.C]~wn_st);
  67.         Outputs the string at the current window cursor position.
  68.  
  69. Prototype:
  70.     void wn_st( char *s, WINDOW *wnp );
  71.  
  72. Parameters:
  73. `co(11,1);    uchar *s;`co();
  74.         The string to output to the window.
  75. `co(11,1);    WINDOW *wnp;`co();
  76.         The window in which the string will be placed.
  77.  
  78. Usage:
  79.     WINDOW *wnp;
  80.     ...
  81.     wn_st( "This line will print at the window cursor position", wnp );
  82.  
  83. `co(10,1);/// wn_st_qty`co();   `keyword(source,[UW_ST.C]~wn_st_qty);
  84.         Outputs a specific number of characters from a string to the window at
  85.     the current window position.  If the number to output is greater than the
  86.     string length, this function will output to the end of the string and
  87.     stop.
  88.  
  89. Prototype:
  90.     void wn_st_qty( char *s, int qty, WINDOW *wnp );
  91.  
  92. Parameters:
  93. `co(11,1);    uchar *s`co();
  94.         The string to output to the window.
  95. `co(11,1);    int qty`co();
  96.         The number of characters from the string to output.
  97. `co(11,1);    WINDOW *wnp`co();
  98.         A pointer to the window in which the output is to occur.
  99.  
  100. Usage:
  101.     WINDOW *wnp;
  102.     ...
  103.     wn_st_qty( "Only 20 chars of this will be output", 20, wnp );
  104.  
  105. `co(10,1);/// wn_qch`co();   `keyword(source,[UW_CH.C]~wn_qch);
  106.         Outputs a character to a window a repeated number of times.
  107.  
  108. Prototype:
  109.     void wn_qch( int cnt, uchar c, WINDOW *wnp );
  110.  
  111. Parameters:
  112. `co(11,1);    int cnt`co();
  113.         The number of times to output the character.
  114. `co(11,1);    uchar c`co();
  115.         The character to output to the window.
  116. `co(11,1);    WINDOW *wnp`co();
  117.         A pointer to the window in which the output is to occur.
  118.  
  119. Usage:
  120.     WINDOW *wnp;
  121.     ...
  122.     wn_qch( 20, '*', wnp );
  123.  
  124. `co(10,1);/// wn_ch`co();   `keyword(source,[UW_CH.C]~wn_ch);
  125.         Outputs one character at the current window cursor location.
  126.     
  127. Prototype:
  128.     void wn_ch( uchar c, WINDOW *wnp );
  129.  
  130. Parameters:
  131. `co(11,1);    uchar c`co();
  132.         The character to output to the window.
  133. `co(11,1);    WINDOW *wnp`co();
  134.         A pointer to the window in which the character is to be drawn.
  135.         
  136. Usage:
  137.     WINDOW *wnp;
  138.     ...
  139.     wn_ch( 'A', wnp );
  140.  
  141. `co(10,1);/// wn_och`co();   `keyword(source,[UW_CH.C]~wn_och);
  142.         Returns the character located at the window cursor location.
  143.     
  144. Prototype:
  145.     uchar wn_och( WINDOW *wnp );
  146.  
  147. Parameters:
  148. `co(11,1);    WINDOW *wnp`co();
  149.         A pointer to the window in which to retrieve the character.
  150.  
  151. Usage:
  152.     WINDOW *wnp;
  153.     uchar val;
  154.     ...
  155.     val = wn_och( wnp );
  156.  
  157. `co(10,1);/// wn_oatt`co();   `keyword(source,[UW_CH.C]~wn_oatt);
  158.         Returns the attribute located at the window cursor location.
  159.     
  160. Prototype:
  161.     uchar wn_oatt( WINDOW *wnp );
  162.  
  163. Parameters:
  164. `co(11,1);    WINDOW *wnp`co();
  165.         A pointer to the window in which to retrieve the attribute.
  166.  
  167. Usage:
  168.     WINDOW *wnp;
  169.     uchar val;
  170.     ...
  171.     val = wn_oatt( wnp );
  172.  
  173. `co(10,1);/// wn_co`co();   `keyword(source,[UW_BDR.C]~wn_co);
  174.         Writes a specific number of characters starting at the current window
  175.     cursor location and moving downward.    This is, in effect, a vertical
  176.     wn_qch routine.
  177.     
  178. Prototype:
  179.     void wn_co( int cnt, uchar c, WINDOW *wnp );
  180.  
  181. Parameters:
  182. `co(11,1);    int qty`co();
  183.         The number of times to output the character.
  184. `co(11,1);    uchar c`co();
  185.         The character to output to the window.
  186. `co(11,1);    WINDOW *wnp`co();
  187.         A pointer to the window in which to output the vertical string.
  188.  
  189. Usage:
  190.     WINDOW *wnp;
  191.     ...
  192.     wn_co( 10, '*', wnp );
  193.  
  194. `co(10,1);/// wn_hline`co();   `keyword(source,[UW_BDR.C]~wn_hline);
  195.         Draws a horizontal line across the window, blending any intersections
  196.     with other lines and points where the line meets the window's left and
  197.     right border.
  198.     
  199. Prototype:
  200.     void wn_hline( int row, int style, WINDOW *wnp );
  201.  
  202. Parameters:
  203. `co(11,1);    int row`co();
  204.         The row number to place the horizontal line.
  205. `co(11,1);    int style`co();
  206.         The style of the line, SGL_BDR or DBL_BDR.
  207. `co(11,1);    WINDOW *wnp`co();
  208.         The window pointer for output.
  209.  
  210. Usage:
  211.     WINDOW *wnp;
  212.     ...
  213.     wn_hline( 5, SGL_BDR, wnp );
  214.  
  215. `co(10,1);/// wn_vline`co();   `keyword(source,[UW_BDR.C]~wn_vline);
  216.         Draws a vertical line down the window, blending any intersections with
  217.     other lines and points where the line meets the window's bottom and top
  218.     border.
  219.     
  220. Prototype:
  221.     void wn_vline( int col, int style, WINDOW *wnp );
  222.  
  223. Parameters:
  224. `co(11,1);    int col`co();
  225.         The column number to place the vertical line.
  226. `co(11,1);    int style`co();
  227.         The style of the line, SGL_BDR or DBL_BDR.
  228. `co(11,1);    WINDOW *wnp`co();
  229.         The pointer to the window for output.
  230.  
  231. Usage:
  232.